home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-27 | 1.1 KB | 50 lines | [TEXT/KAHL] |
- // -----------------------------------------------------------------------------
- // File : demoBoxes.c
- // Date : June 18, 1995
- // Author : Jim Stout
- // Purpose : show the various types of Group boxes available with CDEF 1101
- // :
- // -----------------------------------------------------------------------------
-
- #include "demoDialog.h"
- #include "movableModal.h"
-
- extern void demoBoxes()
- {
- DialogPtr theDialog;
- short itemHit,t,i;
- Rect r;
- ControlHandle h=0,ch=0;
- Boolean on=true;
-
- theDialog = GetNewDialog(240,0L,(DialogPtr)-1);
- if(theDialog) {
- SetPort(theDialog);
-
- ShowWindow(theDialog);
-
- do {
- movableModalDialog(nil,&itemHit);
- switch(itemHit) {
- case 2:
- for(i=3;i<11;i++ ) {
- GetDItem(theDialog, i, &t, (Handle *)&h, &r);
- if(on)
- HiliteControl(h, 0xFF);
- else
- HiliteControl(h, 0);
- }
- on = !on;
- GetDItem(theDialog, 2, &t, (Handle *)&h, &r);
- if(on)
- SetControlTitle(h, "\pDisable");
- else {
- SetControlTitle(h, "\pEnable");
- }
- break;
- }
- }while(itemHit != 1);
- DisposDialog(theDialog);
- }
- }
-